import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'andserver_flutter2_method_channel.dart';

abstract class AndserverFlutter2Platform extends PlatformInterface {
  /// Constructs a AndserverFlutter2Platform.
  AndserverFlutter2Platform() : super(token: _token);

  static final Object _token = Object();

  static AndserverFlutter2Platform _instance = MethodChannelAndserverFlutter2();

  /// The default instance of [AndserverFlutter2Platform] to use.
  ///
  /// Defaults to [MethodChannelAndserverFlutter2].
  static AndserverFlutter2Platform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [AndserverFlutter2Platform] when
  /// they register themselves.
  static set instance(AndserverFlutter2Platform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  @override
  Future<bool?> setRootPath(String rootPath) async {
    throw UnimplementedError('setRootPath() has not been implemented.');
  }

  @override
  Future<bool?> startServer() async {
    throw UnimplementedError('setRootPath() has not been implemented.');
  }

  @override
  Future<bool?> stopServer() async {
    throw UnimplementedError('stopServer() has not been implemented.');
  }
}
